function PlotCoe(t,S,u,Time,Unit)
    
    switch(Time)
        
        case('Minutes')
            
            t = t / 60;
            %[minuntes]Converts the time vector from seconds to minutes.
            
        case('Hours')
            
            t = t / 60 / 60;
            %[hours]Converts the time vector from seconds to hour.
            
        case('Days')
            
            t = t / 60 / 60 / 24;
            %[solar days]Converts the time vector from seconds to solar days.
            
        case('Years')
            
            t = t / 60 / 60 / 24 / 365.25;
            %[Julian years]Converts the time vector from seconds to Julian years.
            
    end
    
    coe = State2Coe(S,u);
    %[km,-,deg,deg,deg,deg]Classical orbital elements matrix.
    
    switch(Unit)
        
        case('KM')
            coe(1,:) = coe(1,:);
       
        case('Earth Radii')
            
            coe(1,:) = coe(1,:) / 6378.136;
            %[Earth radii]Converts semimajor axes from kilometers to Earth radii.
            
        case('Astronomical Units')
            
            coe(1,:) = coe(1,:) / 149597870.700;
            %[AU]Converts semimajor axes from kilometers to astronomical units.
            
    end
    
    Titles = {'Semimajor Axis (a)', ...
        'Eccentricity (e)', ...
        'Inclination (i)', ...
        'RAAN (\Omega)', ...
        'Argument of Periapsis (\omega)', ...
        'True Anomaly (\theta)'};
    %[]Plot title strings.
    
    YLabels = {'Kilometers', ...
        '', ...
        'Degrees', ...
        'Degrees', ...
        'Degrees', ...
        'Degrees'};
    %[]Y-axis strings.
    
    ScreenSize = get(0,'ScreenSize');
    %[]Determines the location and dimensions of the current monitor.
    
    Window = figure( ...
        'Name','CLASSICAL ORBITAL ELEMENTS', ...
        'NumberTitle','Off', ...
        'OuterPosition',ScreenSize);
    %[]Opens a new window and adjusts its properties.
    
    Axes = zeros(1,6);
    %[]Allocates memory for the axes properties.
    
    for k = 1:6;
        
        Axes(k) = subplot(2,3,k, ...
            'FontName','Arial', ...
            'FontSize',8, ...
            'FontWeight','Bold', ...
            'Parent',Window, ...
            'NextPlot','Add', ...
            'XGrid','On', ...
            'YGrid','On', ...
            'XLim',[0,ceil(max(t))], ...
            'YLim',[0,360], ...
            'XTick',linspace(0,ceil(max(t)),11), ...
            'YTick',0:30:360);
        %[]Adds an axes to the specified window and adjusts its properties.
        
        plot(t,coe(k,:), ...
            'Color','k', ...
            'LineStyle','None', ...
            'Marker','.', ...
            'Parent',Axes(k));
        %[]Adds a plot to the specified window and adjusts its properties.
        
        title(Titles{k}, ...
            'FontSize',12, ...
            'Parent',Axes(k));
        %[]Adds a title to the specified axes and adjusts its properties.
        
        ylabel(YLabels{k}, ...
            'FontSize',12, ...
            'Parent',Axes(k));
        %[]Adds a label to the specified y-axis and adjusts its properties.
        
    end
    
    switch(Time)
        
        case('Seconds')
            
            for k = 1:6
                
                xlabel('Time (s)', ...
                    'FontSize',12, ...
                    'Parent',Axes(k));
                %[]Adds a label to the specified x-axis and adjusts its properties.
                
            end
           
        case('Minutes')
            
            for k = 1:6
                
                xlabel('Time (min)', ...
                    'FontSize',12, ...
                    'Parent',Axes(k));
                %[]Adds a label to the specified x-axis and adjusts its properties.
                
            end
            
        case('Hours')
            
            for k = 1:6
                
                xlabel('Time (hr)', ...
                    'FontSize',12, ...
                    'Parent',Axes(k));
                %[]Adds a label to the specified x-axis and adjusts its properties.
                
            end
            
        case('Days')
            
            for k = 1:6
                
                xlabel('Time (solar days)', ...
                    'FontSize',12, ...
                    'Parent',Axes(k));
                %[]Adds a label to the specified x-axis and adjusts its properties.
                
            end
            
    end
    
    switch(Unit)
        
        case('KM')
            ylabel('KM','FontSize',12,'Parent',Axes(1));
            
        case('Earth Radii')
            
            ylabel('Earth Radii','FontSize',12,'Parent',Axes(1));
            %[]Adjusts the y-axis string for the semimajor axis.
            
        case('Astronomical Units')
            
            ylabel('Astronomical Units','FontSize',12,'Parent',Axes(1));
            %[]Adjusts the y-axis string for the semimajor axis.
            
    end
    
    Extent = [floor(min(coe(1,:))), ceil(max(coe(1,:)))];
    %[]Semimajor axis limits.
    
    set(Axes(1),'YLim',Extent,'YTick',linspace(Extent(1),Extent(2),11));
    %[]Adjusts the properties of the specified axes.
    
    if max(coe(2,:)) < 1;
        
        set(Axes(2),'YLim',[0,1],'YTick',0:0.1:1);
        %[]Adjusts the properties of the specified axes.
        
    else
        
        set(Axes(2),'YLim',[0,ceil(max(coe(2,:)))],'YTick',linspace(0,ceil(max(coe(2,:))),11));
        %[]Adjusts the properties of the specified axes.
        
    end
    
    set(Axes(3),'YLim',[0,180],'YTick',0:15:180);
    %[]Adjusts the properties of the specified axes.
    
end
%===================================================================================================